home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / lib / partman / fstab.d / jfs < prev    next >
Text File  |  2007-12-28  |  920b  |  40 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/lib/base.sh
  4.  
  5. for dev in $DEVICES/*; do
  6.     [ -d $dev ] || continue
  7.     cd $dev
  8.     open_dialog PARTITIONS
  9.     while { read_line num id size type fs path name; [ "$id" ]; }; do
  10.         [ $fs != free ] || continue
  11.         [ -f "$id/method" ] || continue
  12.         [ -f "$id/acting_filesystem" ] || continue
  13.         method=$(cat $id/method)
  14.         filesystem=$(cat $id/acting_filesystem)
  15.         case "$filesystem" in
  16.             jfs)
  17.             [ -f "$id/mountpoint" ] || continue
  18.             mountpoint=$(cat $id/mountpoint)
  19.             # due to #249322, #255135, #258117:
  20.             if [ "$mountpoint" = /tmp ]; then
  21.                 rm -f $id/options/noexec
  22.             fi
  23.             options=$(get_mountoptions $dev $id)
  24.             if [ "$mountpoint" = / ]; then
  25.                 if [ "$options" = defaults ]; then
  26.                     options="errors=remount-ro"
  27.                 else
  28.                     options="${options},errors=remount-ro"
  29.                 fi
  30.                 pass=1
  31.             else
  32.                 pass=2
  33.             fi
  34.             echo "$path" "$mountpoint" jfs $options 0 $pass
  35.             ;;
  36.         esac
  37.     done
  38.     close_dialog
  39. done
  40.